<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<title></title>
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/css/common.css">
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/Uploadify/uploadify.css">
	<script type="text/javascript" src='__PUBLIC__/Admin/js/jquery-1.7.2.min.js'></script>
	<script type="text/javascript" src='__PUBLIC__/Uploadify/jquery.uploadify.min.js'></script>
	<script type="text/javascript">
		$(function() {
	    $("#upload").uploadify({
	    	buttonText	  :'上传LOGO',
	        height        : 30,
	        swf           : '__PUBLIC__/Uploadify/uploadify.swf',
	        uploader      : '{:U("Common/uploadBrand")}',
	       		formData : { 'session_id' : '<?php echo session_id();?>' },
	        width         : 100,
	        onUploadSuccess : function(file, data, response){
         		eval("var data = " + data);
         		
         		if (data.status) {
         			var path = '__ROOT__/Uploads/Brand/' + data.path;
         			$('#show img').attr('src', path);
         			$('input[name=logo]').val(data.path);
         		} else {

         		}
        	} 
	    });
	});
	</script>
</head>
<body>
	<div class='status'><span>修改品牌</span><a class='back' href='{:U("index")}'><strong>返回品牌列表<b></b></strong></a></div>
	<div>
		<form method='post' action="{:U('runUpdateBrand')}">
			<table class="table">
				<tr><th colspan='2'>修改品牌</th></tr>
				<tr><td>新名称：</td><td class='td_left'><input type='text' class='text' name='name'/></td></tr>
				<tr>
					<td>更改图片</td>
					<td class='td_left'>
						<div id='show'><img  src=''/></div>
						<input type='file' name='pic' id='upload'/></td>
				</tr>
				<tr><td>是否热门：</td><td class='td_left'><input type='radio' name='hot' value='1'/> 是 <input type='radio' name='hot' value='0' checked='checked'/> 否</td></tr>
				<tr><td colspan='2' class='td_center'>
					<input type='hidden' name='logo' value=''/>
					<input type='hidden' name='id' value="{$_GET['id']}"/>
					<input type='submit' value='保存修改' class='add_btn'/></td></tr>
			</table>
		</form>
	</div>
</body>
</html>